{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-07-31T13:10:32.279815Z",
     "start_time": "2025-07-31T13:10:22.677091Z"
    }
   },
   "source": [
    "from langchain_community.embeddings import OllamaEmbeddings\n",
    "embeddings = OllamaEmbeddings(base_url=\"http://localhost:11434\", model=\"dengcao/Qwen3-Embedding-0.6B:Q8_0\")\n",
    "vec=await embeddings.aembed_query(\"你好\")\n",
    "vec[:100]"
   ],
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[-4.445192337036133,\n",
       " -0.9416047930717468,\n",
       " -1.1028451919555664,\n",
       " 6.833281517028809,\n",
       " -0.3629014492034912,\n",
       " 1.5876641273498535,\n",
       " 3.2299845218658447,\n",
       " -2.7423789501190186,\n",
       " -5.701356887817383,\n",
       " 10.298196792602539,\n",
       " -6.179408073425293,\n",
       " 2.0597496032714844,\n",
       " 7.767849445343018,\n",
       " -0.9241658449172974,\n",
       " -4.048587322235107,\n",
       " 3.3168704509735107,\n",
       " 0.8896684646606445,\n",
       " 2.524656057357788,\n",
       " 4.211628437042236,\n",
       " -5.4029765129089355,\n",
       " -0.5028953552246094,\n",
       " -4.36771297454834,\n",
       " -0.4946594536304474,\n",
       " -5.184694766998291,\n",
       " 1.0697426795959473,\n",
       " 0.2902210056781769,\n",
       " -0.741428792476654,\n",
       " 7.291892051696777,\n",
       " 1.8735885620117188,\n",
       " -0.01770332269370556,\n",
       " 5.403592109680176,\n",
       " 2.014937400817871,\n",
       " -3.1161959171295166,\n",
       " -5.2763671875,\n",
       " -1.899326205253601,\n",
       " -0.6272895336151123,\n",
       " -1.5541974306106567,\n",
       " 3.570683002471924,\n",
       " -3.0759551525115967,\n",
       " 5.486623287200928,\n",
       " -3.768409252166748,\n",
       " 0.5368784666061401,\n",
       " 11.163253784179688,\n",
       " 1.9109042882919312,\n",
       " -1.6491626501083374,\n",
       " 10.715115547180176,\n",
       " 3.869054079055786,\n",
       " 0.39043354988098145,\n",
       " -1.5179768800735474,\n",
       " 2.5486502647399902,\n",
       " -3.129333257675171,\n",
       " -1.5247271060943604,\n",
       " 1.85404634475708,\n",
       " -0.23628413677215576,\n",
       " 2.740494728088379,\n",
       " -0.4183344542980194,\n",
       " 2.9446091651916504,\n",
       " 0.6682046055793762,\n",
       " 3.114318609237671,\n",
       " -2.038281202316284,\n",
       " -10.788786888122559,\n",
       " -2.722385883331299,\n",
       " -3.453920841217041,\n",
       " 2.357235908508301,\n",
       " 3.186563491821289,\n",
       " -2.94793701171875,\n",
       " 2.3898849487304688,\n",
       " -5.137711048126221,\n",
       " -6.871884822845459,\n",
       " -1.1687341928482056,\n",
       " -1.3203582763671875,\n",
       " -1.0081260204315186,\n",
       " -6.522543907165527,\n",
       " 0.3008745312690735,\n",
       " -2.9201102256774902,\n",
       " 0.8058832287788391,\n",
       " -3.603013277053833,\n",
       " 3.9146687984466553,\n",
       " -2.2503695487976074,\n",
       " -2.4706530570983887,\n",
       " -0.20251867175102234,\n",
       " -4.227306842803955,\n",
       " -3.689404010772705,\n",
       " -2.274583339691162,\n",
       " -3.7102112770080566,\n",
       " 2.629101276397705,\n",
       " 1.6656934022903442,\n",
       " 4.144183158874512,\n",
       " -0.12523780763149261,\n",
       " -4.6229681968688965,\n",
       " 3.1941606998443604,\n",
       " -0.3738718032836914,\n",
       " -1.5002837181091309,\n",
       " -3.5768449306488037,\n",
       " 5.99796724319458,\n",
       " 0.5770477056503296,\n",
       " -0.6155384182929993,\n",
       " -3.68178129196167,\n",
       " -2.465643882751465,\n",
       " -0.36291348934173584]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 7
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "",
   "id": "3f57bcbd05b8f695"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
